<?php
namespace app\modules\film\models;


use app\common\base\ApiModel;

class TypeOfFilm extends ApiModel{

    public static function tableName(){
        return 'type_of_film';
    }

    // public function behaviors()
    // {
    //     return [
    //         [
    //             'class' => TimestampBehavior::class,
    //         ]
    //     ];
    // }

    public function rules()
    {
        return [
            [['film_id', 'type_id'], 'required'],
            [['film_id', 'type_id'], 'integer'],
        ];
    }

    public function getFilmType(){
        return $this->hasMany(FilmType::class, ['film_type' => 'type_id']);
    }


}